(function( $ ){
	$.fn.ntScroll = function(options) {

		var defaults = {
			'speed' : 1000,
			'topMargin': 20,
			'easing': 'easeOutQuad'
		};

		var settings = $.extend( {}, defaults, options );

			function scrollingTo(id) {
			    $("html, body").animate({
			        scrollTop: ($(id).offset().top) - settings.topMargin
			    }, {duration: settings.speed, easing: ''+settings.easing+''});
			}
	
			return this.each(function() {

			$(this).on("click", function (e) {
			    e.preventDefault();
			    var target = $(this).attr("scroll-to");
			    scrollingTo(target);
			});

		});
	}; 

})( jQuery );